<?php

/* @var $this yii\web\View */
use yii\helpers\Html;
use yii\helpers\ArrayHelper;
use yii\widgets\LinkPager;
use yii\bootstrap\ActiveForm;
use yii\helpers\Url;
?>
<?php if($teacher) { ?>
<ul class="teacherList font12">
				<?php foreach($teacher as $key => $val) {?>
					<li class="t3out">
						<div class="teacherListL">
							<a title="<?= Html::encode($val['teacher_name']) ?>" href="<?php echo Url::to(['teacher/teacherinfo']);?>?teacher_id=<?= Html::encode($val['teacher_id']) ?>" class="go font12" type='<?= Html::encode($val['teacher_id']) ?>' style="width: 120px; height: 120px;">
								<img alt="" src="http://files.bwphp.com/file/image/show/250/160?path=<?= Html::encode($val['teacher_thumb']) ?>" style="width: 120px; height: 120px;">
							</a>
							<div onmouseover="this.style.cursor='hand'" style='padding-top:5px'>
								<center>
									<font size='4px' class='like<?= Html::encode($val['teacher_id']) ?>'>喜欢：  <?= Html::encode($val['like']) ?> </font>
									<span class='like' type='<?= Html::encode($val['teacher_id']) ?>'>
										<?php if($val['is_like'] == 1){?>
											<img src="<?php echo Url::to('@web/public/likes.png', true);?>" alt="" style="width: 30px;"/>
										<?php }else{ ?>
											<img src="<?php echo Url::to('@web/public/like.png', true);?>" alt="" style="width: 30px;"/>
										<?php }?>
										</span>
								</center>
							</div>
						</div>
						<div class="teacherListR">
							<p class="font20 color00 marginB14 t3out p">
								<?= Html::encode($val['teacher_name']) ?>
								<?php if($val['recommend']) { ?>
									<font color="red">推荐</font>
								<?php } ?>
								<a href="<?php echo Url::to(['teacher/teacherinfo']);?>?teacher_id=<?= Html::encode($val['teacher_id']) ?>" class="go font12" type='<?= Html::encode($val['teacher_id']) ?>'>	查看他的课程
								</a>
							</p>
							<p class="color66 marginB14"><span class="color99">来源：</span><?= Html::encode($val['from_name']) ?></p>
							<p class="color66 marginB14"><span class="color99">职位：</span><?= Html::encode($val['position_name']) ?></p>
							<p class="color66"><span class="color99">简介：</span>
								<?php 
									if(mb_strlen($val['teacher_desc'])>45){
										echo mb_substr($val['teacher_desc'],0,45,'utf-8').'...';
									}else{
										echo $val['teacher_desc'];
									}
								?>
							</p>
						</div>
					</li>
				<?php } ?>
			</ul>
<div align="center">
	<?php echo LinkPager::widget([
		'pagination' => $pagination,
		'prevPageLabel'=>'上一页',
		'nextPageLabel'=>'下一页',
	]);?>
</div>
<?php }else{ ?>
	<table id="user-table" class="table table-striped table-hover" style="height:100px">
		<tbody>
			<tr>
				<td colspan="20">
					<center><div class="empty" style="padding-top: 35px;">没有您要查询的记录</div></center>
				</td>
			</tr>
		</tbody>
	</table>
<?php } ?>